package com.red.star.wechat.data.entity.bo;

import com.google.common.collect.Lists;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

/**
 * @ProjectName: macalline-work-server
 * @Package: com.red.star.macalline.data.entity.bo
 * @Description: 虚拟号码
 * @Author: AMGuo
 * @CreateDate: 2018/9/13 上午11:57
 * @Version: 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class VirtualNumber {

    private String virtualNumber;

    private List<Party> partyList = Lists.newArrayList();

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    public static class Party {
        String aParty;

        String bParty;

        Date endTime;
    }

    public VirtualNumber(String virtualNumber) {
        this.virtualNumber = virtualNumber;
    }


    public void appendParty(Party party) {
        this.partyList.add(party);
    }

    public Integer getBindSize() {
        return partyList.size();
    }
}
